CFLAGS = -g
INCLUDE = -I/lib/modules/2.6.18/source/include/ -I/usr/src/PF_RING/userland/lib -I/usr/include/libxml2 -I/usr/local/include
LIBS = -L /usr/lib -L . -lpthread -lpcre -lz -lxml2 -lLzclue #-l/usr/local/lib
SRCS = webmail.c common.c analyse_sina.c analyse_21cn.c analyse_sohu.c analyse_163.c analyse_hotmail.c analyse_yahoo.c analyse_tom.c analyse_yeah.c analyse_eyou.c analyse_263.c analyse_qq.c analyse_sogou.c analyse_126.c analyse_188.c analyse_gmail.c mail_type.c control.c analyse_mail.c analyse_aol.c analyse_hanmail.c analyse_139.c analyse_m_163.c analyse_m_qq.c
OBJS = webmail.o common.o analyse_sina.o analyse_21cn.o analyse_sohu.o analyse_163.o analyse_hotmail.o analyse_yahoo.o analyse_tom.o analyse_yeah.o analyse_eyou.o analyse_263.o analyse_qq.o analyse_sogou.o analyse_126.o analyse_188.o analyse_gmail.o mail_type.o control.o analyse_mail.o analyse_aol.o analyse_hanmail.o analyse_139.o analyse_m_163.o analyse_m_qq.o
HEADS = common.h mail_type.h

all: libLzwebmail.so
libLzwebmail.so: $(SRCS) $(HEADS)
	gcc -g -fPIC -shared -o libLzwebmail.so $(SRCS) $(INCLUDE) $(LIBS)
	rm -f /usr/lib/libLzwebmail.so
	cp libLzwebmail.so /usr/lib

clean:
	rm -rf  libLzwebmail.so
	rm -f *~
